package com.hupu.jrs.api.game

import com.hupu.jrs.bean.*
import retrofit2.http.*
import rx.Observable

/**
 * Created by Stark.Tony on 2018/3/18.
 */
interface GameService {

    @FormUrlEncoded
    @POST("user/loginUsernameEmail")
    fun login(
            @FieldMap params: Map<String, String>, @Query("client") client: String): Observable<LoginData>

    @FormUrlEncoded
    @POST("user/page")
    fun getUserInfo(
            @FieldMap params: Map<String, String>, @Query("client") client: String): Observable<UserData>

    @GET("collect/getThreadsCollectList")
    fun getCollectList(
            @Query("sign") sign: String, @QueryMap params: Map<String, String>): Observable<ThreadListData>

    @GET("search/list")
    fun search(@QueryMap params: Map<String, String>,
               @Query("client") client: String): Observable<SearchData>

    @FormUrlEncoded
    @POST("pm/list")
    fun queryPmList(
            @FieldMap params: Map<String, String>, @Query("client") client: String): Observable<PmData>

    @FormUrlEncoded
    @POST("pm/detail")
    fun queryPmDetail(
            @FieldMap params: Map<String, String>, @Query("client") client: String): Observable<PmDetailData>

    @FormUrlEncoded
    @POST("pm/send")
    fun pm(@FieldMap params: Map<String, String>,
           @Query("client") client: String): Observable<SendPmData>

    @FormUrlEncoded
    @POST("pm/setting")
    fun queryPmSetting(
            @FieldMap params: Map<String, String>, @Query("client") client: String): Observable<PmSettingData>

    @FormUrlEncoded
    @POST("pm/clear")
    fun clearPm(
            @FieldMap params: Map<String, String>, @Query("client") client: String): Observable<BaseData>

    @FormUrlEncoded
    @POST("pm/block")
    fun blockPm(
            @FieldMap params: Map<String, String>, @Query("client") client: String): Observable<BaseData>
}
